#include "CPoint.h"
#include <cmath>
CPoint::CPoint(): fx(0.0), fy(0.0){}
CPoint::CPoint(float inFx, float inFy): fx(inFx), fy(inFy){}
CPoint::CPoint(const CPoint &inPoint): fx(inPoint.fx), fy(inPoint.fy){}

float CPoint::GetFx(){
	return fx;
}

void CPoint::SetFx(float inFx){
	fx = inFx;
}

float CPoint::GetFy(){
	return fy;
}

void CPoint::SetFy(float inFy){
	fy = inFy;
}

void CPoint::SetCPoint(float inFx, float inFy){
	fx = inFx;
	fy = inFy;
}

float CPoint::GetDistance(CPoint inPoint){
	double tempX, tempY;
	tempX = inPoint.fx - this->fx;
	tempY = inPoint.fy - this->fy;
	return (float)sqrt(tempX * tempX + tempY * tempY);
}

void CPoint::CopyCPoint(CPoint inPoint){
	CPoint::SetCPoint(inPoint.GetFx(), inPoint.GetFy());
}